package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.contain.ContainValue;
import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.AddManagerActivity;
import com.wwtech.epp.ui.activity.friend.contract.AddManagerContract;
import com.wwtech.epp.ui.activity.friend.presenter.AddManagerPresenter;
import com.wwtech.epp.ui.adapter.main.CheckPersonAdapter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of AddManagerActivity, provide field for AddManagerActivity
 * @date 2017/09/14 15:21:18
 */
@Module
public class AddManagerModule {
    private final AddManagerContract.View mView;


    public AddManagerModule(AddManagerContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public AddManagerPresenter provideAddManagerPresenter(HttpAPIWrapper httpAPIWrapper, AddManagerActivity mActivity) {
        return new AddManagerPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public AddManagerActivity provideAddManagerActivity() {
        return (AddManagerActivity) mView;
    }

    @Provides
    @ActivityScope
    public CheckPersonAdapter provideCheckPersonAdapter() {
        return new CheckPersonAdapter(ContainValue.userList);
    }

}